import request from '@/utils/request'

// 查询货转信息列表
export function listTransfer(query) {
  return request({
    url: '/transfers/transfer/list',
    method: 'get',
    params: query
  })
}

// 查询货转信息详细
export function getTransfer(goodsTransferId) {
  return request({
    url: '/transfers/transfer/' + goodsTransferId,
    method: 'get'
  })
}

// 新增货转信息
export function addTransfer(data) {
  return request({
    url: '/transfers/transfer',
    method: 'post',
    data: data
  })
}

// 修改货转信息
export function updateTransfer(data) {
  return request({
    url: '/transfers/transfer',
    method: 'put',
    data: data
  })
}

// 删除货转信息
export function delTransfer(goodsTransferId) {
  return request({
    url: '/transfers/transfer/' + goodsTransferId,
    method: 'delete'
  })
}

// 审核货转信息
export function auditTransfer(data) {
  return request({
    url: '/transfers/transfer/audit',
    method: 'put',
    data: data
  })
}

// 查询追踪信息详细
export function getTraceActivity(goodsTransferIds) {
  return request({
    url: '/transfers/transfer/trace/' + goodsTransferIds,
    method: 'get'
  })
}

// 查询重量
export function getTransferWeightSum(query) {
  return request({
    url: '/transfers/transfer/transferweightsum',
    method: 'get',
    params: query
  })
}
